package test;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class driver
{
    @Autowired
    @Qualifier("truck")
    private car car;
    public void driver()
    {
        System.out.println("上班上班上班！");
        car.drive();
    }
}
